
// button object
local PANEL = {};

/*------------------------------------
	divider mouse released
------------------------------------*/
function PANEL:OnMouseReleased( mcode )

	// go go gadget BaseClass!
	self.BaseClass.OnMouseReleased( self, mcode );
	
	// make sure its the left mouse button
	if ( mcode != MOUSE_LEFT ) then
	
		// nothing else to do
		return;
	
	end
	
	// call resize event function
	local CheckPanelResized = function( panel )
	
		// validate the panel and make sure it has the the event
		if ( panel && panel:IsValid() && panel.OnResized ) then
		
			// call the event
			panel:OnResized();
		
		end
		
	end
	
	// call the event on all possible containers
	CheckPanelResized( self );
	CheckPanelResized( self.m_pRight );
	CheckPanelResized( self.m_pMiddle );
	CheckPanelResized( self.m_pLeft );

end

// define
derma.DefineControl( "MXHorizontalDivider", "", PANEL, "DHorizontalDivider" );
